package com.zjdiepu.www.manage.api.dz;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.zjdiepu.www.base.BaseController;
import com.zjdiepu.www.base.core.ApiResponse;
import com.zjdiepu.www.common.util.UUIDFactory;
import com.zjdiepu.www.ibiz.dz.IDzLendingService;
import com.zjdiepu.www.model.dz.dto.DzLending;

@RestController
@RequestMapping(value= "DzLendingController", produces="application/json;charset=UTF-8")
@Api(tags = {"贷中_银行放款"}, produces="application/json;charset=UTF-8")
public class DzLendingController extends BaseController{

	@Resource
	private IDzLendingService dzLendingService;
	/** 
	* @author zhangzj
	* @Title: insertLending 
	* @Description: 添加银行放款信息
	* @param @param dzLending
	* @param @return    设定文件 
	* @return ApiResponse    返回类型 
	* @version V1.0
	* @throws 
	*/
	@ApiOperation(value = "添加银行放款信息", response = Boolean.class, httpMethod="POST", tags={"添加"})
    @RequestMapping(value = "insertLending", method = RequestMethod.POST)
	public ApiResponse insertLending(@ModelAttribute DzLending dzLending){
		dzLending.setId(UUIDFactory.getUUID());
		dzLendingService.insert(dzLending);
		return ApiResponse.success(true);
	}
}
